From: Richard M. Stallman Date: Mon, 24 May 1993 22:58:54 +0000 (+0000) Subject: (modify_event_symbol): If a name_table elt is null, X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96018 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=d1f504609f9e56343a0375d25965d3f718b40eef;p=emacs.git (modify_event_symbol): If a name_table elt is null, generate a name to use. Don't crash. --- diff --git a/src/keyboard.c b/src/keyboard.c index 327713942fb..371f4c3089e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2739,7 +2739,14 @@ modify_event_symbol (symbol_num, modifiers, symbol_kind, name_table, if (NILP (*slot)) { /* No; let's create it. */ - *slot = intern (name_table[symbol_num]); + if (name_table[symbol_num]) + *slot = intern (name_table[symbol_num]); + else + { + char buf[20]; + sprintf (buf, "key-%d", symbol_num); + *slot = intern (buf); + } /* Fill in the cache entries for this symbol; this also builds the Qevent_symbol_elements property, which the user